New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nets

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nets

nothin but nets. http client that works in node and browsers

  • 3.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.5K
decreased by-11.48%
Maintainers
2
Weekly downloads
 
Created
Source

nets

Mac/LinuxWindows
TravisBuild status

js-standard-style

Nothin but nets. HTTP client that works the same in node and browsers

Uses xhr for browsers and request for node

get
var nets = require("nets")

nets({ url: "http://placekitten.com/g/400/400" }, function(err, resp, body) {
  // body is a Buffer containing the image
})

Note that nets returns data as Buffers by default, in both node and in browsers. You can pass {encoding: undefined} to turn this off.

post
var nets = require("nets")

nets({
  body: '{"foo": "bar"}',
  url: "/foo",
  method: "POST",
  headers: {
    "Content-Type": "application/json"
  }
}, function done (err, resp, body) {

})

FAQs

Package last updated on 19 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc